
<?$this->load->view('admin/tools/admin-header')?>
<?$this->load->view('admin/tools/admin-menu')?>
<?
if($jumlah_foto>=5){
	//do nothing
}else{
$this->load->view('admin/tools/admin-ajaxscr');
}
?>
<div class="wrap">
	<div id="icon-index" class="icon32"><br /></div><br>
<h3><a>Home ->Listing -> <?=$kode_listing?></a></h3>
<?if($mode!=""){echo"<div id='message' class='updated fade'><p>$pesan</p></div>";}?>
<div id="dashboard-widgets-wrap">

<div class="tablenav">
<div class="alignleft">
<table width="250" align="center" border="1">
		<tr style="background:">
			<td width="250" valign="middle" align="center">
			<font face="verdana" size="2" color="#FF0000">
			<div style="float:left">
			</div></font>
			</td>
		</tr>
		</table>
</div>
</div>
<br><br><br>
<table width="900" border="1" cellspacing="4" style="background:#E1E1E1;" border="1" style="float: auto;">
	<th scope="col" width="20%"></th>
	<th scope="col" width="20%"></th>
	<th scope="col" width="20%"></th>
	<th scope="col" width="20%"></th>
	<th scope="col" width="20%"></th>

	<tbody>
	<tr valign="top" >
	<?
	$i =0; 
	$kolom=5;
	foreach ($query as $row){
			$id			= $row->id;
			$nama		= $row->filename;
			$kode_listing = $row->kode_listing;
			
			if ($i >= $kolom){
			echo"</tr><tr>";
			$i=0;
		}
		$i++;
		?>
		
		<td width="20%" align="center">&nbsp;<br>
		<a href="<?=base_url()?>utility/listings/<?=$nama?>" rel="lightbox[tes]"><img border="2" src="<?=base_url()?>utility/listings/<?=$nama?>" width="150"  height="150"></a><br><br>
		<a href="<?=site_url('administrator/delete_foto_listing/'.$id.'/'.$kode_listing)?>" title="Delete File"><img src="<?=base_url()?>css/icon/delete.png"></a></td>
	<?}
		if($i<5){
			for($j=$i;$j<5;$j++){
			echo"<td width='20%'>&nbsp;</td>";	
			}
		}
	echo"</tr>";
	?>
	
	</tbody>
</table>

</div>
</div><!-- wrap -->


<div class="clear"></div></div><!-- wpbody-content -->
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
</div><!-- wpwrap -->

<!--admin-footer-->
<?$this->load->view('admin/tools/admin-footer');?>
<!--admin-footer-->
